import request from '@/utils/request'

// 登录接口
export const login = (data) => request.post('/user/login', data)

// 注册接口
export const register = (data) => request.post('/user/registered', data)

// 获取用户信息接口
export const getUserInfo = () => request.get('/user')

// 退出登录接口
export const userLogout = () => request.post('/user/logout')

// 查看收藏列表
export const getCollect = (obj) => request.get('/user/favorites', {
  params: {
    ...obj
  }
})
